package com.example.hcbmsm.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.hcbmsm.service.AnalyzeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/analyze")
public class AnalyzeController {

    @Autowired
    private AnalyzeService analyzeService;

    @RequestMapping("/getData1")
    public JSONObject getData1(){
        return analyzeService.getData1();
    }

    @RequestMapping("/getData2")
    public List<JSONObject> getData2(){
        return analyzeService.getData2();
    }

    @RequestMapping("/getData3")
    public JSONObject getData3(){
        return analyzeService.getData3();
    }
}
